package com.cx.mall.customer.controller;

import com.cx.mall.common.util.ResponseVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/test")
public class TestController {

    /**
     * 测试customer服务是否正常启动
     */
    @GetMapping("/health")
    public ResponseVo health() {
        log.info("Customer服务健康检查");
        return ResponseVo.success("Customer服务运行正常");
    }

    /**
     * 测试消息消费状态
     */
    @GetMapping("/consumer-status")
    public ResponseVo consumerStatus() {
        log.info("检查消息消费者状态");
        return ResponseVo.success("消息消费者已配置，等待消息...");
    }
}
